#include "Usage.h"

#define FREQ 10000

u32 TickNum = 0;
u8 Usage = 0;

void Usage_TimeTick(void)
{
	TickNum++;
}
void Usage_Loop(void)
{
	if(TickNum > FREQ)
	{
		Usage =  100;
	}
	else
	{
		Usage = TickNum / (FREQ / 100);
	}
	TickNum = 0;
}
u8 GetUsage(void)
{
	return Usage;
}
